package com.sun.service.impl;

import com.sun.entity.Book;
import com.sun.mapper.BookMapper;
import com.sun.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author SunRui
 * @description TODO
 * @date 2024/8/10 22:11
 */
@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookMapper bookMapper;

    @Override
    public Book getBook(int id) {
        return bookMapper.getBook(id);
    }

    @Override
    public int setBookSatus(int id, int satus) {
        return bookMapper.setBookSatus(id, satus);
    }

    @Override
    public int setBookSatusMore(List<Integer> id, int satus) {
        return bookMapper.setBookSatusMore(id,satus);
    }

    @Override
    public List<Book> getList(String tex, int categoryId) {
        return bookMapper.getList(tex, categoryId);
    }

    @Override
    public Book bookTs(String code) {
        return bookMapper.bookTs(code);
    }
}
